package com.ms.game.jackpot;

import com.ms.game.jackpot.task.BrocastGameJackPotMoneyTimerTask;
import com.ms.service.telnet.STelnetCmd;
import com.xpec.c4.service.module.BasicServiceModule;
import com.xpec.c4.service.module.task.TaskTimer;

public class JackPotBrocastModule extends BasicServiceModule 
{
	public static final String ALL_GAME = "ALL";
	
	/**
	 * 定時廣播jp
	 */
	public static final int BROCAST_JP_DELAY_TIME = 30 *1000;
	
	@Override
	public void init() 
	{
		super.init();
		this.setBasicprocesser(new JackPotBrocastProcesser());
	}
	
	@Override
	public boolean startup()
	{
		return super.startup();
	}
	
	
	@Override
	public void shutdown() 
	{
		super.shutdown();
	}

	
	@Override
	public void onModuleServerReadyStart()
	{
		this.registerActionClass(JackPotBrocastAction.class);
		
		
		BrocastGameJackPotMoneyTimerTask task = new BrocastGameJackPotMoneyTimerTask();
		task.setTimerOption(TaskTimer.LOOP);
		task.setInitialDelay(1000*10);
		task.setPeriod(JackPotBrocastModule.BROCAST_JP_DELAY_TIME);
		task.setCallback(this);
		task.module = this;
		addTaskTimer(task);
		
		super.onModuleServerReadyStart();
	}
	

	@Override
	public void procThrowException(Object obj) {
		

	}

	@Override
	public void procTelnetCommand(STelnetCmd obj) {
		

	}
	
	
}
